/*
 * 应用启动
 */
var express = require("express");
var orm = require("./orm");
var path = require('path');
var app = express();
var bodyParser = require("body-parser");
/*
 * 连接数据库ORM
 */



app.use(orm);

app.use(bodyParser());
app.use(bodyParser({
	uploadDir: 'public'+ '/tmp'
}));

/*
 * 配置
 */
var port = 2224;

var router = require("./router")(app);

app.listen(port);
console.log("HTTP服务开启在" + port + "端口上。");